<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script>
    class Father {
      constructor(a,b){
        this.a =a
        this.b =b
      }
      sum(){
        console.log(this.a+this.b)
      }
    }

    class Son extends Father{
      constructor(a,b){
        super(a,b)
      }
    }
    
    var ts1 = new Son(3,3)
    ts1.sum()
  </script>
</body>
</html>